#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>

int main(int argc, char **argv)
{
    QApplication app (argc, argv);

    QPushButton button ("Hello World");
    //连接按钮的clicked信号到QApplication的quit槽函数
    QObject::connect(&button, &QPushButton::clicked, &app, &QApplication::quit); 		
    button.resize(200, 100);
    button.show();

    return app.exec();
}